REV_NUM=`svn info | grep -i revision | awk '{print $2}'`
svn update
i=$REV_NUM

while (($i>0)); do 
    out=`python testChessBoard.py | grep -i error`
    if [[ "$out" == *Error* ]];
    then
        `svn update -r $i`
        echo "Reverting to revision: $i"
        $((i--))
    else 
        echo "Test correctly passes at revision: $i"
        $i=0
    fi
done
